package com.ftg.learn.chapter02;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * 学习类型
 * @author kangjx
 * @createTime 2022/7/6
 */
public class LearnType {

    public static void main(String[] args) {
//      =  赋值运算符
//       标识符 = 值 类型一致
        // Java 什么类型的语言 [数据类型] 强类型语言  弱类型
//        [基本类型] [标识符] [=] [值];
        int aint  = 130;
        byte bByte = (byte)aint;
        System.out.println(bByte);
        short s = (short)12312321;
        System.out.println(s);
        int t = 12312321;
        long l = 1321321321321321321L;
        System.out.println(8765432L-12345678);
        float f = 3.0f;
        float f1 = 3;
        char c = '*'; //两个字节 char
        System.out.println("中".getBytes(Charset.forName("gb2312")).length);
        //字符编码 GB2312 2个字节 万国码 utf-8 3个字节 utf8mb4 4个字节
        boolean a = true;
        boolean b = false;
    }

}
